package com.px.chapter_Dec_1.textt.fileTEst;

import com.px.chapter_Dec_1.textt.User;

import java.io.*;
import java.net.UnknownServiceException;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class InputIo {
    public static void main(String[] args) throws IOException {


        RandomAccessFile fa = new RandomAccessFile(new File("D:\\3.txt"), "rw");
        int a;
        long start=fa.getFilePointer();
        a = fa.read();
        int key = 153;
        while (a != -1) {
            fa.seek(start);
            fa.write(a^key);
            start=fa.getFilePointer();
            a = fa.read();
        }


    }
}
